import java.util.Scanner;

public class demo {


    //    字符串反转
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            String str = in.next();
            char[] ch = str.toCharArray();
            int start = 0;
            int end = ch.length - 1;
            while(start < end) {
                char tmp = ch[start];
                ch[start] = ch[end];
                ch[end] = tmp;
                start++;
                end--;
            }
            System.out.println(ch);
        }
    }




//    公共子串计算
//    给定两个只包含小写字母的字符串，计算两个字符串的最大公共子串的长度。
//注：子串的定义指一个字符串删掉其部分前缀和后缀（也可以不删）后形成的字符串。

    //str1表示短的字符串
    public static int getNum(String str1, String str2) {
        char[] ch1 = str1.toCharArray();
        char[] ch2 = str2.toCharArray();
        int len1 = ch1.length;
        int len2 = ch2.length;
        int[][] arr = new int[len1+1][len2+1];
        int maxSum = 0;
        for(int i = 1; i <= len1; i++) {
            for(int j = 1; j <= len2; j++) {
                if(ch1[i-1] == ch2[j-1]) {//因为数组下标是从0开始的
                    arr[i][j] = arr[i-1][j-1] + 1;
                    if(maxSum < arr[i][j]) {
                        maxSum = arr[i][j];
                    }
                }
            }
        }
        return maxSum;
    }
    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);
        while(in.hasNext()) {
            String str1 = in.next();
            String str2 = in.next();
            if(str1.length() < str2.length()) {
                System.out.println(getNum(str1, str2));
            }else {
                System.out.println(getNum(str2, str1));
            }
        }
    }
}
